import Vue from 'vue'
import "../static/font/css/font-awesome.css";
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
import 'element-ui/lib/theme-chalk/base.css';
import uploader from 'vue-simple-uploader'
import App from './App'
import router from './router'
import utils from "./assets/commonjs/utils";

import axios from 'axios';

axios.defaults.withCredentials = true;

import tdPlugIn from './packages'
Vue.use(tdPlugIn);

import CKEditor from '@ckeditor/ckeditor5-vue';
Vue.use( CKEditor );

Vue.prototype.$utils = utils;

Vue.use(ElementUI);
window.eventBus = new Vue();
Vue.use(uploader);

(()=>{
  if (process.env.NODE_ENV !== 'development') {
    axios.get("serverconfig.json").then((result) => {
      localStorage.configPath = JSON.stringify(result.data);
    }).catch((error) => {
    });
  }
})();


Vue.config.productionTip = false;

/* eslint-disable no-new */
new Vue({
  el: '#app',
  router,
  components: {App},
  template: '<App/>'
});
